package com.itouch.bracelet.bluetooth;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;


/**
 * 

* @ClassName: BluetoothValue

* @Description: TODO() 

* @author sunshineHu hucx@itouch.com.cn

* @date 2015年1月15日 上午10:08:44 

*
 */
public enum BluetoothValue {

	INSTANCE;
	
	private volatile int connectStatus;//连接状态
	public byte[] id;//母亲手表id
//	public String address;
	
	private volatile boolean bluetoothStatus=false;//蓝牙开关

	public volatile boolean disConnecting=false;//正在断开状态值，不能使用connectstatus表示，犹豫正在断开存在两种状况，可能即时已连接又是未连接状态
	
	//硬件的状态
	public Boolean stepStatus;//计步器开关
	public Boolean takeIncorrectStatus;//防抱错开关
	public Boolean braceletWarnStatus;//手环报警状态
	
	
	//app的状态
	public Boolean temperatureStatus;//体温开关
	public Boolean lowEnergyStatus;//低压开关
	public Boolean lostStatus;//脱落开关
	public Boolean outOfRangeStatus;
	
	
	public BlockingQueue<BluetoothPacket> packetQueue=new ArrayBlockingQueue<BluetoothPacket>(100);//数据包队列，默认容量为10

	public int getConnectStatus() {
		return connectStatus;
	}

	//保证原子性
	public synchronized void setConnectStatus(int connectStatus) {
		this.connectStatus = connectStatus;
	}

	public boolean isBluetoothStatus() {
		return bluetoothStatus;
	}

	public synchronized void setBluetoothStatus(boolean bluetoothStatus) {
		this.bluetoothStatus = bluetoothStatus;
	}
	
	
	
	
}
